package priv.yiyuan.example.design.wrapper;

/**
 * 借记卡支付
 * <p>
 * 策略模式-具体策略
 * 装饰器模式-具体组件
 *
 * @author YiYuan
 * @data 2025/9/2
 * @apoNote
 */
public class DebitCardPayment implements PaymentStrategy {

    private String accountNumber;

    public DebitCardPayment(String accountNumber) {
        this.accountNumber = accountNumber;
    }

    @Override
    public void pay(double amount) {
        System.out.println("使用借记卡 " + accountNumber + " 支付 " + amount + " 元。");
    }

    @Override
    public String getDescription() {
        return "借记卡支付";
    }
}
